package com.lxf.clouduser.mapper;

import com.lxf.clouduser.bean.UserRatingBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 罗兴发
 * @data 2025/7/4 15:09
 * @description：用户评分-持久层
 */
@Mapper
public interface UserRatingMapper {

    int addUserRating(@Param("list") List<UserRatingBean> list);

    int updateUserRating(@Param("r") UserRatingBean r);

    UserRatingBean getRatingByObjIdAndObjTypeAndUserId(@Param("objId") String objId,
                                                       @Param("objType") Integer objType,
                                                       @Param("userId") Integer userId);

    List<UserRatingBean> findByObjType(@Param("objType") Integer objType);
}
